<?php $this->_extends('_layouts/blank_layout'); ?>

<?php $this->_block('title'); ?> - 主机管理<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

	<div id="getting-started">
	    <table>
		<tr><th width="5">　</th><th>主机名</th><th>MAC地址</th><th>OS系统</th><th>主机IP地址</th><th>创建时间</th><th width="55" align="center">操作</th></tr>
		<?php foreach ($manage as $s): ?>
		<tr class="<?php if(($countno+1)/2==ceil(($countno+1)/2)){echo 'tw';} ?>"><td align="center"><?php echo $countno++;?></td><td><?php echo $s->hostname;?></td><td><?php echo $s->macaddress;?></td><td><?php echo $s->ostype;?></td><td><?php echo $s->ipaddr;  ?></td><td><?php echo $s->datetime;  ?></td><td>
			 <a href="<?php echo url('default::default/framework', array('id' => $s->id.'|'.$gid,'control' => 'hostmanage','acts' => 'admins|unhost')); ?>" onclick="if(!confirm('确认移除绑定吗？')){return false;}"><img src="images/icons/unlink.png" title="移除"></a>
				</td></tr>
		<tr class="<?php if(($countno)/2==ceil(($countno)/2)){echo 'tw';} ?>"><td colspan="7">
		<table border="1" class="dashbroad"><tr><td>登录时间</td><td>登录IP</td><td>登录方式</td><td>登录用户</td><td>CPU资源利用</td><td>内存利用</td><td>网卡吞吐</td></tr>
		<tr><td><?php echo $s->terminals->date.' '.$s->terminals->time;?></td><td><?php echo $s->terminals->loginip; ?></td><td><?php echo $s->terminals->loginname; ?></td><td><?php echo $s->terminals->loginuser; ?></td><td><div class="breakl b105"><?php echo $s->infos->cpuvalue;?></div></td><td><div class="breakl b105"><?php echo $s->infos->memvalue;?></div></td><td><div class="breakl b105"><?php echo $s->infos->intotal.'/'.$s->infos->outtotal;?></div></td></tr>
		</table>
		</td></tr>
		<?php endforeach; ?>
		</table>
	</div>

<?php $this->_endblock('contents'); ?>